package com.cordershy.pojo;

import org.apache.ibatis.type.Alias;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.math.BigDecimal;

@Component
@Alias(value = "income")
public class income implements Comparable<income>,Serializable {
    private int incomeid;
    private String incomename;
    private String incomedate;
    private BigDecimal income;
    private String incomeyear;
    private String incomemonth;
    private String incomeday;
    private String username;

    public income() {
    }

    public income(int incomeid, String incomename, String incomedate, BigDecimal income, String incomeyear, String incomemonth, String incomeday, String username) {
        this.incomeid = incomeid;
        this.incomename = incomename;
        this.incomedate = incomedate;
        this.income = income;
        this.incomeyear = incomeyear;
        this.incomemonth = incomemonth;
        this.incomeday = incomeday;
        this.username = username;
    }

    public void setIncomeid(int incomeid) {
        this.incomeid = incomeid;
    }

    public void setIncomename(String incomename) {
        this.incomename = incomename;
    }

    public void setIncomedate(String incomedate) {
        this.incomedate = incomedate;
    }

    public void setIncome(BigDecimal income) {
        this.income = income;
    }

    public void setIncomeyear(String incomeyear) {
        this.incomeyear = incomeyear;
    }

    public void setIncomemonth(String incomemonth) {
        this.incomemonth = incomemonth;
    }

    public void setIncomeday(String incomeday) {
        this.incomeday = incomeday;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public int getIncomeid() {
        return incomeid;
    }

    public String getIncomename() {
        return incomename;
    }

    public String getIncomedate() {
        return incomedate;
    }

    public BigDecimal getIncome() {
        return income;
    }

    public String getIncomeyear() {
        return incomeyear;
    }

    public String getIncomemonth() {
        return incomemonth;
    }

    public String getIncomeday() {
        return incomeday;
    }

    public String getUsername() {
        return username;
    }

    @Override
    public String toString() {
        return "income{" +
                "incomeid=" + incomeid +
                ", incomename='" + incomename + '\'' +
                ", incomedate='" + incomedate + '\'' +
                ", income=" + income +
                ", incomeyear='" + incomeyear + '\'' +
                ", incomemonth='" + incomemonth + '\'' +
                ", incomeday='" + incomeday + '\'' +
                ", username='" + username + '\'' +
                '}';
    }

    @Override
    public int compareTo(com.cordershy.pojo.income o) {
        return Integer.parseInt(o.getIncomeday())-Integer.parseInt(this.getIncomeday());
    }
}
